n, m = map(int,input().split())
l1 = []
for _ in range(n):
    x1,y1 = map(int, input().split())
    l1.append([x1,y1])
l2 = []
for _ in range(m):
    x1,y1 = map(int, input().split())
    l2.append([x1,y1])
res = []
for x in l2:
    sx,sy = x[0],x[1]
    count = 0
    for y in l1:
        ex,ey = y[0],y[1]
        c = abs(ey-sy) + abs(ex-sx)
        count += c
    res.append(count)
for x in res:
    print(x)